#include <iostream>
#include <stack>

#include "BinaryTree.hpp"

using namespace std;

class Solution
{
public:
    int maxDepth(TreeNode *root)
    {
        if (root == NULL)
            return 0;
        return 1 + std::max(maxDepth(root->left), maxDepth(root->right));
    }
};

int main()
{
    TreeNode *root = CreatTree("[3,9,20,null,null,15,7]", "null");
    Solution s;
    cout << s.maxDepth(root) << endl;
    return 0;
}